// 获取对应字典名称
export function getDictName(dict, val) {
  for (let i = 0; i < dict.length; i++) {
    const obj = dict[i]
    if (obj.value === Number(val)) {
      return obj.name
    }
  }
}

// 获取对应字典值
export function getDictValue(dict, name) {
  for (let i = 0; i < dict.length; i++) {
    const obj = dict[i]
    if (obj.name === name) {
      return obj.value
    }
  }
}
